import request from '@/utils/request'


const api = '/api/system/sysMenu'

export function getList(){
    return request({
        url:`${api}/findNodes`,
        method:'get'
    })
}

export function getByID(searchObj){
    return request({
        url:`${api}/get/${searchObj}`,
        method:'get'
    })
}

export function save(sysMenu){
    return request({
        url:`${api}/save`,
        method:'post',
        data:sysMenu
    })
}

export function update(sysMenu){
    return request({
        url:`${api}/update`,
        method:'put',
        data:sysMenu
    })
}

export function remove(id){
    return request({
        url:`${api}/remove/${id}`,
        method:'delete',
    })
}

export function getParentMenu(){
    return request({
        url:`${api}/selectParent`,
        method:'get'
    })
}